use task_define::Task;

use super::uaccess::KERNEL_DS;
use crate::{sched::current::current_mut, space::addr::init_stack_base};

#[no_mangle]
static INIT_TASK: Task = Task::new();

pub(crate) fn task_init() {
    let init = current_mut();
    init.set_name("swapper");
    init.set_stack(init_stack_base());
    init.set_thread_addr_limit(KERNEL_DS);
    init.thread_flags = 0;
    init.thread_preempt = 0;
}
